<?php
/**
 * 福利卡管理
 * @link https://www.leadshop.vip/
 * @copyright Copyright ©2020-2021 浙江禾成云计算有限公司
 */

namespace leadmall\api;

use card\api\IndexController as CardModules;
use leadmall\Map;
use Yii;

class CardController extends CardModules implements Map
{
    public $modules = [
        'changeNum'  => '增加金额',
        'changeStatus'  => '入库作废',
    ];
    public function actionCreate()
    {
        $include = Yii::$app->request->get('include', '');

        $module = $this->modules[$include] ?? false;
        if (!$module) {
            Error('未定义操作');
        }

        return $this->{$include}();
    }
}
